// js/animation.js
import styles from '@styles/animation.scss'
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
 
const millis = parseInt(styles.animationMillis)
 

<CSSTransitionGroup
 transitionName="component"
 transitionEnterTimeout={millis}
 transitionLeaveTimeout={millis}
/>